<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <style>
        .box {
            width: 850px;
            background-color: aquamarine;
            margin: 250px auto;
            border-radius: 5px;
            padding: 10px;
        }
        
        .box ul {
            overflow: hidden;
        }
        
        ul li {
            position: relative;
            float: left;
            width: 60px;
            height: 60px;
            list-style: none;
            margin-right: 10px;
        }
        
        ul li a {
            text-decoration: none;
        }
        
        .current {
            width: 180px;
        }
        
        .current .big {
            display: block;
        }
        
        .current .small {
            display: none;
        }
        
        .small {
            position: absolute;
            left: 0;
            top: 0;
            width: 60px;
            height: 60px;
            border-radius: 5px;
        }
        
        .big {
            display: none;
            width: 180px;
            height: 60px;
            border-radius: 5px;
        }
    </style>
</head>

<body>
    <script src="jquery.min.js"></script>
    <script type="text/javascript">
        $(function() {
            // 鼠标经过li
            $(".box li").mouseenter(function() {
                // 1.当前li宽度为180 里面的小图片淡出，大图片淡入
                $(this).stop().animate({
                    width: 180
                }, 200).find(".small").stop().fadeOut().siblings(".big").stop().fadeIn();
                // 2.其余兄弟宽度变为60px,小图片淡入，大图片淡出
                $(this).siblings("li").animate({
                    width: 60
                }).find(".small").fadeIn().siblings(".big").fadeOut();
            })
        });
    </script>
    <div class="box">
        <ul>
            <li class="current">
                <a href="#">
                    <img src="./img/A1.jpeg" class="small">
                    <img src="./img/A.jpg" class="big">
                </a>
            </li>
            <li>
                <a href="#">
                    <img src="./img/B2.jpeg" class="small">
                    <img src="./img/B.jpg" class="big">
                </a>
            </li>
            <li>
                <a href="#">
                    <img src="./img/C3.jpg" class="small">
                    <img src="./img/C.jpg" class="big">
                </a>
            </li>
            <li>
                <a href="#">
                    <img src="./img/D4.jpg" class="small">
                    <img src="./img/D.jpg" class="big">
                </a>
            </li>
            <li>
                <a href="#">
                    <img src="./img/E5.jpg" class="small">
                    <img src="./img/E.jpg" class="big">
                </a>
            </li>
        </ul>
    </div>
</body>

</html>